package controller;

import dao.UnblockUserDao;

public class UnblockUserController {

    private final UnblockUserDao unblockUserDao = new UnblockUserDao();

    public String[] getUsers() {
        return unblockUserDao.getUsers();
    }

    public boolean unblockUser(Object selectedItem) {
        if (checkUserStatus(selectedItem)) {
            unblockUserDao.unblockUser(selectedItem);
            return true;
        }
        return false;
    }

    private boolean checkUserStatus(Object selectedItem) {
        return unblockUserDao.checkUserStatus(selectedItem);
    }
}